feat(kanban): card comments (DB board)#42
Conversation
Add a Comments section to the card peek for the DB-backed board: list, post, and delete (own comments; admins/owners may delete any). Comments are a DB-board feature — file boards keep discussion in the note body. - migration 0016_kanban_comments: kanban_card_comments (id, workspace_id, card_id, author_user_id, body, timestamps; FK cascades). - handlers/kanban/comment.rs: list / create / delete with role gates and author-or-admin delete; timestamps CAST AS CHAR (sqlx no-time-feature). - routes + module registration. - api.ts: listComments / createComment / deleteComment + KanbanComment type. - shared: BoardComment type + BoardSurfaceProps (loadComments / addComment / deleteComment / currentUser) threaded to BoardPeek, which fetches on open and renders the thread + a composer; delete shows only on the current user's own comments. Section hidden when no loader is supplied (file board). - Kanban.tsx wires the callbacks (+ getStoredUsername for the current user). - kanban_tests.rs: card_comments_crud. Verified: cargo check + 39 kanban_tests pass against MySQL (incl. the new test and the 0016 migration), web tsc clean, and a harness confirmed the peek thread (render, add, and delete-own-only — lee's comment had no delete for user jack). Note: migration 0016 (D2 webhooks should take 0017). Follow-up: realtime broadcast for comments, edit, and @mentions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 31 minutes and 39 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (21)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # services/jtype-web/frontend/src/api.ts # services/jtype-web/frontend/src/pages/Kanban.tsx # services/jtype-web/src/lib.rs # services/jtype-web/tests/kanban_tests.rs # shared/components/board/BoardPeek.tsx # shared/components/board/BoardSurface.tsx # shared/components/board/types.ts # shared/i18n/locales/en/messages.mjs # shared/i18n/locales/en/messages.po # shared/i18n/locales/ja/messages.mjs # shared/i18n/locales/ja/messages.po # shared/i18n/locales/ko/messages.mjs # shared/i18n/locales/ko/messages.po # shared/i18n/locales/zh/messages.mjs # shared/i18n/locales/zh/messages.po # shared/lib/board.ts
What
Implements B1 — a Comments thread on the card peek for the DB-backed board: list, post, and delete (own comments; admins/owners may delete any). Per the roadmap decision, comments are a DB-board feature — file boards keep discussion in the note body.
Changes
0016_kanban_comments—kanban_card_comments(id, workspace_id, card_id, author_user_id, body, timestamps; FK cascades).handlers/kanban/comment.rs—list/create/deletewith role gates and author-or-admin delete; timestampsCAST AS CHAR.api.ts—listComments/createComment/deleteComment+KanbanComment.BoardCommenttype +BoardSurfaceProps(loadComments/addComment/deleteComment/currentUser) threaded toBoardPeek, which fetches on open and renders the thread + a composer. Delete shows only on the current user's own comments. Section hidden when no loader is supplied (file board).Kanban.tsxwires the callbacks (+getStoredUsernamefor the current user).kanban_tests.rs—card_comments_crud.Verification
cargo check+ 39kanban_testspass against MySQL (incl. the new test and the 0016 migration); webtscclean.jack; deleting jack's worked).Notes
🤖 Generated with Claude Code